//
//  HeapStruct.h
//  AlgorithmLearning
//
//  Created by aron on 2017/11/2.
//  Copyright © 2017年 aron. All rights reserved.
//

#ifndef HeapStruct_h
#define HeapStruct_h

#include <stdio.h>

typedef int16_t ElementType;

struct HeapStruct;
typedef struct HeapStruct *PriorityQueue;

PriorityQueue PQ_Initialize(int MaxElements);
void PQ_Destory(PriorityQueue H);
void PQ_MakeEmpty(PriorityQueue H);
void PQ_InsertToMinQueue(ElementType x,PriorityQueue H);
ElementType PQ_DeleteMin(PriorityQueue H);
ElementType PQ_FindMin(PriorityQueue H);
void PQ_InsertToMaxQueue(ElementType x,PriorityQueue H);
ElementType PQ_DeleteMax(PriorityQueue H);
ElementType PQ_FindMax(PriorityQueue H);
int PQ_IsEmpty(PriorityQueue H);
int PQ_IsFull(PriorityQueue H);

struct HeapStruct {
    int Capacity;
    int Size;
    ElementType *Elements;
};

#endif /* HeapStruct_h */
